package com.lbs.view.adapter;

import java.util.ArrayList;

import com.lbs.droiddoctor.R;
import com.lbs.droiddoctor.disease.Disease;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class PredictDiseaseAdapter extends BaseAdapter {
	private Context ctx;
	private ArrayList<Disease> diseases;
	
	public PredictDiseaseAdapter(Context ctx, ArrayList<Disease> diseases) {
		this.ctx = ctx;
		this.diseases = diseases;
	
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return diseases.size();
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup arg2) {
		View v = null;
		if (convertView != null) {
			v = convertView;
		} else {
			LayoutInflater inflater = LayoutInflater.from(ctx);
			v = inflater.inflate(R.layout.diseaseitem, null);
		}
		TextView tv = (TextView) v.findViewById(R.id.textView1);
		
		
		tv.setText("   " + diseases.get(position).getDiseaseName());

		return v;
	}

}
